home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
PRG
/
SysMenu 1.4 Folder.sit
/
SysMenu 1.4 Folder
/
SysMenu 1.4
/
About INIT Dispatcher
next >
Wrap
Text File
|
1996-06-24
|
2KB
|
42 lines
INIT Dispatcher - A way to make FAT System Extensions
This is a template I have used to make a System Extension I am working on.
It consists of 3 MW projects that compile a demo INIT:
* 68K Dispatch Resource ==> Compiled + Ready to use
* 68K Executable Resource ¥
=> Common code base
* PPC Executable Resource /
The Dispatch project creates a valid INIT resource, which looks for the
appropriate executable resource ('PPC・' or '68K・') with the same res ID
and executes it as if it were a normal INIT. By looking at the installed
CPU, it provides better reliability than testing for the MixedMode trap
(which can be defined by CFM-68K). If there is a problem loading the PPC
code, then it will fall back on the 68K.
The 68K project creates a '68K・' resource, merged into the INIT file. It
is compiled with a custom resource header, so it uses the appropriate
libraries and A4-related calls.
The PPC project creates a 'PPC・' resource, also merged into the INIT file.
As it sits, this project creates a PPC fragment with no header or descriptor,
but the Dispatcher will properly handle a resource starting with either a
RoutineDescriptor or the raw CFM container.
I hope this helps someone out. I am sure there are other techniques for doing
this, but *I* got it to work so I am using it. Drop me a line if you use it,
or it crashes your machine, or if you just wanna talk. I'm there for you.
Changes from 1.1 to 1.2
* Fixed the Gestalt call to to gracefully accept an error code on 68K
systems that simply doesn't know about the new selector.
Changes from 1.2 to 1.3
* Updated for CW8
* Removed test for PPC 620
* Better ResError checking
Matt Slot (fprefect@umich.edu) - 6/24/96
<http://www.si.umich.edu/~fprefect>